FROM openjdk:21-jdk

LABEL maintainer="breeze"
LABEL version="1.0"
LABEL description="blockchain docker image"
LABEL image="ajun990105/blockchain:latest"

# 路径
ARG JAR_FILE=./build/libs/blockchain.jar
ARG SKYWALKING_AGENT_FLODER=./skywalking-agent

# 拷贝
COPY ${SKYWALKING_AGENT_FLODER} /Users/breeze/dockerImages/skywalking-agent
COPY ${JAR_FILE} /Users/breeze/dockerImages/blockchain.jar

CMD java \
-Dskywalking.agent.service_name=blockchain \
-javaagent:/Users/breeze/dockerImages/skywalking-agent/skywalking-agent.jar \
-Dskywalking.collector.backend_service=127.0.0.1:12800 \
-jar /Users/breeze/dockerImages/blockchain.jar \
-Dserver.tomcat.uri-encoding=UTF-8 \
-Duser.timezone=GMT+8

WORKDIR /Users/breeze/dockerImages/
EXPOSE 8080

